﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using Hisun.Components;
using System.Reflection;

namespace Hisun
{
    public sealed class HisunHttpModule : IHttpModule
    {
        //public event PageEvent PreInit;
        public string ModuleName
        {
            get { return "HisunHttpModule"; }
        }
        private void Application_BeginRequest(object source, EventArgs e)
        {
            HttpApplication application = (HttpApplication)source;
            HttpContext context = application.Context;
            HisunContext.Create(context, false);


        }
        public void Dispose()
        {
            //Jobs.Instance().Stop();
        }

        public void Init(HttpApplication application)
        {
            application.BeginRequest += new EventHandler(Application_BeginRequest);
            //Jobs.Instance().Start();

        }

    }
}
